pub enum My_Event {
    GoSleep { time: i32 },
    Work { task_name: String },
}

pub fn match_a_event_is_go_sleep(event: &My_Event) {
    match event {
        My_Event::GoSleep { time } => {
            println!("{}", time);
        }
        My_Event::Work { task_name } => {
            println!("{}", task_name);
        }
    }
}